<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no">
</head>
<body>
<div class="content_body">
    
</div>
<script>
    function *show() {
        alert("a");
        yield;  //yield表示暂停执行
        alert("b");
    }
    let p=show();

    // 踹两脚，才能执行两个alert，如果只写一个p.next(),只会执行yield的上一个alert
    p.next();
    p.next();
</script>
</body>
</html>